<? if (!defined("BASEPATH")) exit("No direct script access allowed");

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false );
header("Pragma: no-cache");

/*
// file_hash generálás
$this->load->model("ent2image");
$this->db->cache_off();
$getEnt2image = ($this->ent2image->getEnt2image());
foreach($getEnt2image as $d) {
	$save_path = $_SERVER["DOCUMENT_ROOT"].str_replace("media", "uploads", MEDIA);
	$this->ent2image->update($d["e2iId"], array("e2i_hash" => md5(file_get_contents($save_path.$d["e2iImageName"]))));
}
$this->db->query("commit");
exit;
*/
/*
// art_order karbantartás
$this->db->cache_off();
$this->load->model("article_model");
$this->article_model->fixOrder();
$this->db->query("commit");
exit;
*/

$h1 = "";
//common::pr($breadcrumbs);
if(isset($breadcrumbs) and count($breadcrumbs) > 1) {
	$tmp = $breadcrumbs;
	$h1 = array_pop($tmp);
}

?>

<!doctype html>
<html lang="en">
	<head>
		<title>
			<?=((isset($title))?($title." - "):($this->lang->line("SITE_TITLE")." - ")).$this->config->item("siteName")?>
		</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta name="viewport" content="width=device-width,initial-scale=1" />
		<meta name="description" content="" />
		<link rel="shortcut icon" href="<?=MEDIA?>images/favicon.ico" type="image/x-icon" />
		<link rel="canonical" href="<?=current_url()?>" />

		<!-- font Awesome -->
		<link href="<?=MEDIA?>admin_lte/css/font-awesome.min.css" rel="stylesheet" type="text/css" />

		<!--[if lt IE 9]>
		<script type="text/javascript" src="<?=MEDIA?>js/IE9.js"></script>
		<script type="text/javascript" src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
		<![endif]-->
		<link rel="stylesheet" href="<?=MEDIA?>cat/cat.css" media="screen,projection" />
		<link rel="stylesheet" href="<?=MEDIA?>css/print.css" media="print" />

		<? /* <script src="<?=MEDIA?>cat/cat.js.php" type="text/javascript"></script> */ ?>

		<? //<script src="http://code.jquery.com/jquery.min.js"></script> ?>
		<script src="<?=MEDIA?>js/jquery.js"></script>
		<script src="<?=MEDIA?>js/jquery.masonry.min.js"></script>
		<script src="<?=MEDIA?>js/jquery.nicescroll.min.js"></script>
		<script src="<?=MEDIA?>js/script.js"></script>

		<? // Lightbox ?>
		<script type="text/javascript" src="<?=MEDIA?>lightbox/js/jquery.lightbox-0.5.pack.js"></script>

		<? // Scroll ?>
		<? /*<script src="<?=MEDIA?>scroll/js/jquery-ui-1.8.23.custom.min.js" type="text/javascript"></script>
		<script src="<?=MEDIA?>scroll/js/jquery.mousewheel.min.js" type="text/javascript"></script>
		<script src="<?=MEDIA?>scroll/js/jquery.kinetic.js" type="text/javascript"></script>;*/ ?>
		<? /* <script src="<?=MEDIA?>scroll/js/jquery.smoothdivscroll-1.3-min.js" type="text/javascript"></script> */ ?>
		<? /* <script src="<?=MEDIA?>scroll/js/jquery.smoothDivScroll-1.3.js" type="text/javascript"></script> */ ?>

		<? // Carousel ?>
		<script src="<?=MEDIA?>carousel/jquery.carouFredSel-6.2.0-packed.js" type="text/javascript"></script>
		<script src="<?=MEDIA?>carousel/helper-plugins/jquery.mousewheel.min.js" type="text/javascript"></script>
		<script src="<?=MEDIA?>carousel/helper-plugins/jquery.touchSwipe.min.js" type="text/javascript"></script>

		<? // Simplemodal ?>
		<script type="text/javascript" src="<?=MEDIA?>simplemodal/jquery.simplemodal.1.4.3.min.js"></script>
		<!--[if lt IE 7]>
		<style type='text/css'>
			#simplemodal-container a.modalCloseImg {
				background:none;
				right:-14px;
				width:22px;
				height:26px;
				filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(
					src='img/x.png', sizingMethod='scale'
				);
			}
		</style>
		<![endif]-->

		<? // LoadMask ?>
		<script type="text/javascript" src="<?=MEDIA?>loadmask/jquery.loadmask.min.js"></script>

		<? // SmartWizard ?>
		<script type="text/javascript" src="<?=MEDIA?>smartwizard/js/jquery.smartWizard.js"></script>

		<? // Tooltip ?>
		<script type="text/javascript" src="<?=MEDIA?>tooltip/jquery.tools.min.js"></script>

		<? // Autocomplete ?>
		<script type="text/javascript" src="<?=MEDIA?>autocomplete/js/jquery.autocomplete.js"></script>

		<? //Analytics ?>
		<script>
			(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
			(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
			m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
			})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

			ga('create', 'UA-25535781-1', 'auto');
			ga('send', 'pageview');

		</script>

	</head>

	<body id="body">

		<header class="clearfix" <?=($h1 ? "style=\"background: url(".MEDIA."img/bg-header-small.jpg) repeat-x scroll 50% 0 #fff; height: 640px;\"" : "")?>>
			<div id="modal" style="display:none;"></div>
			<div id="topbar">
				<div class="topbar_content">
					<div class="fl">
						<? echo anchor("", "<img src=\"".MEDIA."img/logo_small.png\" alt=\"\" />", "style=\"margin-left: 0\"") ?><em>|</em>
						<?
						foreach($load_vars_getArticles as $ii => $art) {
							if($art["artPosition"] == "H") {
								echo	anchor($art["artUrlName"], $art["artName"])." <em>|</em>";
								unset($load_vars_getArticles[$ii]);
							}
						}
						?>
						<? echo anchor("https://www.facebook.com/move2study", "<img src=\"".MEDIA."img/f_logo.png\" alt=\"Facebook\" height=\"23\" width=\"23\" />", "onclick=\"window.open(this.href); return false;\"") ?>
					</div>

					<div id="login">

						<script type="text/javascript">
							$(document).ready(function(){
								$(".down").click(function(e) {
									e.preventDefault();
									$this = $(this);
									$this.next().css('left', $this.offset().left);
									$this.next().slideDown('fast').show();
									$this.removeClass('down').addClass('up');
									$this.next().hover(function() {
										}, function(){
											$this.next().slideUp('slow', function() {
												$this.removeClass('up').addClass('down');
											});
									});
									return false;
								});
							});
						</script>

						<?
							if($h1) {
							
								echo	anchor("", $this->lang->line("ADVANCED_SEARCH")."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", "id=\"advanced_search\" class=\"down\"");

								echo	"<ul class=\"subnav\" style=\"padding:5px; width:300px;\">";
								echo		form_open("search");
								echo			form_input(array("type" => "search", "class" => "data", "name" => "searchtext", "id" => "searchtext", "placeholder" => $this->lang->line("QUICK_SEARCH"), "value" => $this->input->post("searchtext"), "style" => "width: 286px;"));
								echo			form_input(array("type" => "submit", "class" => "inlinebutton", "value" => $this->lang->line("SEARCH")));
								echo			anchor("advanced_search", $this->lang->line("ADVANCED_SEARCH"), "style=\"margin:0; float: right;\"");
								echo		form_close();
								echo	"</ul>";
							}

							if($this->session->userdata("usrId")) {
								echo	"<span id=\"unreadMessagesCnt\"></span>";
								echo	"
										<script>
											function getUnreadMessages() {
												$.ajax({
													type: 'POST',
													cache: false,
													url: '".site_url("get_unread_messages")."',
													success: function (result) {
														if(result > 0) {
															$('#unreadMessagesCnt').html('<a href=\"".site_url("messages")."\"><i class=\"fa fa-envelope-o\"></i> <sup>' + result + '</sup></a>');
														} else {
															$('#unreadMessagesCnt').html('');
														}
													},
													error: function (error) {}
												});
											}
											$(function() {
												getUnreadMessages();
												setInterval(function(){ getUnreadMessages() }, 3000);
											})
											</script>
										";

								echo	anchor("", $this->lang->line("LOGGED_IN")."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", "id=\"logged_in\" class=\"down\"");
						?>
								<ul class="subnav">
									<li><?=anchor("", $this->session->userdata("usrEmail"), "onclick=\"return false;\" id=\"topbar_email\"")?></li>
									<? if(Common::isAdmin() or Common::isSuperAdmin()) { ?>
										<li><?=anchor("admin", $this->lang->line("ADMIN"), "onclick=\"window.open(this.href); return false;\"")?></li>
									<? } ?>
									<? //if(!$this->session->userdata("usrProvider")) { ?>
										<li><?=anchor("settings", $this->lang->line("SETTINGS"))?></li>
									<? //} ?>
									<li><?=anchor("messages", $this->lang->line("MESSAGES"))?></li>
								</ul>
							<?
								echo	anchor("logout", $this->lang->line("LOGOUT"));
							} else {
								echo	anchor("", $this->lang->line("LOGIN"), "onclick=\"
									$.ajax({type: 'POST', url: '".site_url()."login_form', data:'redirect=".current_url()."', beforeSend: function(xhr) {\$('#body').mask('".$this->db->escape_str($this->lang->line("PLEASE_WAIT,_PROCESSING_IN_PROGRESS"))."');} }).
										always(function() {\$('#body').unmask();});
									return false;
								\"");
							?>
							<em>|</em>
							<?=anchor("", $this->lang->line("REGISTER"), "onclick=\"
								$.ajax({url: '".site_url()."registration_form', beforeSend: function(xhr) {\$('#body').mask('".$this->db->escape_str($this->lang->line("PLEASE_WAIT,_PROCESSING_IN_PROGRESS"))."');} }).
									always(function() {\$('#body').unmask();});
								return false;
							\"")?>
							<?
							}
						?>

					</div>
				</div>
			</div>
			<div class="inner">
				<?
					if($h1) {
						echo	"<h1 id=\"logo\" style=\"width:100%; background: none; height:37px;\">".anchor("", $h1, "style=\"text-indent: 0; color: #FFFFFF; display: inline-block; width: auto;\"")."</h1>";
					} else {
						echo	"<h1 id=\"logo\">".anchor("", $this->lang->line("SITE_TITLE"))."</h1>";
						echo	form_open("search", array("id" => "quicksearch"));
						echo		form_input(array("type" => "search", "class" => "data", "name" => "searchtext", "id" => "searchtext", "placeholder" => $this->lang->line("QUICK_SEARCH"), "value" => $this->input->post("searchtext")));
						echo		form_input(array("type" => "submit", "class" => "inlinebutton", "value" => $this->lang->line("SEARCH")))."<br/>";
						echo		anchor("advanced_search", $this->lang->line("ADVANCED_SEARCH"));
						echo	form_close();
					}
				?>
				<div class="headpic" style="width: 660px; <?=($h1 ? "top: 110px" : "")?>">
					<? if(isset($google_map_big) and $google_map_big) { ?>
						<script src="http://maps.google.com/maps/api/js?sensor=false&language=en&amp;key=AIzaSyChKlShjLaj3A0thExsw65l_nWUXMe9RE8"></script>
						<div class="gmap spots" id="map_canvas"></div>
						<?=$google_map_big?>
					<? } else {
							$sliderStr = "";
							if(isset($getEnt2image) and count($getEnt2image)) {
								foreach($getEnt2image as $image) {
									if($image["e2iCropped"] == "I") {
										if(!$image["e2iAlt"] and isset($pagetitle) and $pagetitle) {
											$image["e2iAlt"] = $pagetitle;
										}
										$sliderStr .= "<div class=\"slide\">
															<img src=\"".UPLOADS.$image["e2iImageNameCropped"]."\" height=\"350\" width=\"660\" />
															".(($image["e2iAlt"])?("<div class=\"lead\">".$image["e2iAlt"]."</div>"):(""))."
														</div>";
									}
								}
								if($sliderStr) {
									echo	$sliderStr;
								}
							}
							if(!$sliderStr and isset($load_vars_getEnt2imageMainSlider) and count($load_vars_getEnt2imageMainSlider)) {
								shuffle($load_vars_getEnt2imageMainSlider);
								foreach($load_vars_getEnt2imageMainSlider as $image) {
									if($image["e2iCropped"] == "I") {
										if(!$image["e2iAlt"] and isset($pagetitle) and $pagetitle) {
											$image["e2iAlt"] = $pagetitle;
										}
										$sliderStr .= "<div class=\"slide\">
															".(($image["insPresenter"] == "I")?("<a href=\"".site_url("institutes/".$image["insUrlName"])."\">"):(""))."
																<img src=\"".UPLOADS.$image["e2iImageNameCropped"]."\" height=\"350\" width=\"660\" />
																".(($image["e2iAlt"])?("<div class=\"lead\">".$image["e2iAlt"]."</div>"):(""))."
															".(($image["insPresenter"] == "I")?("</a>"):(""))."
														</div>";
									}
								}
								echo	$sliderStr;
							}
							?>
						<? if(!$sliderStr) { ?>
							<img src="<?=MEDIA?>img/pic-slider.jpg" width="660" height="350" alt="">
							<? if(isset($pagetitle)) { ?>
								<h1 class="title"><?=$pagetitle?></h1>
							<? } ?>
							<? /*
							<div class="lead">
								Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillium dolore eu.
							</div>
							*/ ?>
						<? } ?>
					<? } ?>
				</div>
				<? if(isset($sliderStr) and $sliderStr) { ?>
					<script type="text/javascript">
						$(".headpic").carouFredSel({
							items		: 1,
							scroll		: {
								fx		: "crossfade"
							},
							auto		: true
						});
					</script>
				<? } ?>
				<?
				if(isset($google_map) and $google_map) {
					echo	"<script src=\"http://maps.google.com/maps/api/js?sensor=false&language=en\"></script>";
				?>
					<div class="sidemenu map" <?=($h1 ? "style=\"top: 110px\"" : "")?>>
						<div class="gmap spots" id="map_canvas"></div>
					</div>
				<?
					echo	$google_map;
				} else {
				?>

				<div class="sidemenu" style="<?=($h1 ? "top: 110px" : "")?>">

					<?
						if(isset($getArticleKiemelt) and count($getArticleKiemelt)) {
							echo	"<nav>";
							echo		"<ul>";
							foreach($getArticleKiemelt as $d) {
								echo			"<li ".(($this->uri->segment(2) == $d["artUrlName"])?("class=\"active\""):("")).">".anchor($d["artUrlName"], "<span>".$d["artName"]."</span>", ((strlen($d["artName"]) > 24)?("style=\"font-size:15px;\""):(""))." title=\"".$d["artName"]."\"")."</li>";
							}
							echo		"</ul>";
							echo	"</nav>";
						} elseif(isset($getSubjectKiemelt) and count($getSubjectKiemelt)) {
							echo	"<nav>";
							echo		"<ul>";
							foreach($getSubjectKiemelt as $d) {
								foreach($d["children"] as $subData) {
									echo			"<li ".(($this->uri->segment(2) == $subData["subUrlName"])?("class=\"active\""):("")).">".anchor("majors/".$subData["subUrlName"], "<span>".$subData["subName"]."</span>")."</li>";
								}
							}
							echo		"</ul>";
							echo	"</nav>";
						}

						if(isset($topInstitutes) and count($topInstitutes)) { ?>
							<div class="info long">
								<h2 class="title blue"><?=$this->lang->line("TOP")." ".$ENTITY." ".$this->lang->line("COURSES")?></h2>

								<ul class="category">
									<?
									foreach($topInstitutes as $couUrlName => $couData) {
										echo	"<li>".anchor($couData["conUrlName"]."/".$couUrlName, $couData["couName"], "class=\"categorytitle\"");
										echo		"<ul class=\"list\">";
										foreach($couData["city"] as $cityUrlName => $cityData) {
											foreach($cityData["ins"] as $insUrlName => $insData) {
												//echo			"<li>".anchor($couData["conUrlName"]."/".$couUrlName."/".$cityUrlName."/".$insUrlName, $insData["insName"])."</a></li>";
												echo			"<li>".anchor("institutes/".$insUrlName, $insData["insName"])."</a></li>";
											}
										}
										echo		"</ul>";
										echo	"</li>";
									}
									?>
								</ul>

							</div>
						<? } else { ?>
						<div class="info">
							<h2 class="title">Move2Study</h2>
							<p><?=$this->lang->line("MAIN_PAGE_DESCRIPTION")?></p>
						</div>
					<? } ?>

				</div>

				<? } ?>

				<nav id="mainmenu" <?=($h1 ? "style=\"top: 470px\"" : "")?>>
					<ul>
						<li <?=(($this->uri->segment(1) == "study-abroad")?("class=\"active\""):(""))?>><?=anchor("study-abroad", "<span>Study abroad</span>")?>
							<div class="submenu">
								<ul class="multicol colnum2">
									<li class="category col clearfix">
										<h4 class="categorytitle"><?=$this->lang->line("STUDY_ABROAD_PROGRAM_HIGHLIGHTS")?></h4>
										<ul class="multicol colnum2 list">
											<li><?=anchor("study-abroad/university", $this->lang->line("UNIVERSITY"))?></li>
											<li><?=anchor("study-abroad/high-school", $this->lang->line("HIGH_SCHOOL"))?></li>
											<li><?=anchor("study-abroad/college", $this->lang->line("COLLEGE"))?></li>
											<li><?=anchor("study-abroad/semester", $this->lang->line("SEMESTER"))?></li>
											<li><?=anchor("study-abroad/winter-term", $this->lang->line("WINTER_TERM"))?></li>
											<li><?=anchor("study-abroad/language-schools", $this->lang->line("LANGUAGE_SCHOOLS"))?></li>
											<li><?=anchor("study-abroad/full-degree", $this->lang->line("FULL_DEGREE"))?></li>
											<li><?=anchor("study-abroad/intensive-language-courses", $this->lang->line("INTENSIVE_LANGUAGE_COURSES"))?></li>
										</ul>
									</li>
									<li class="category col clearfix">
										<h4 class="categorytitle">Program spotlight</h4>
										<a href="#" class="framed"><img src="<?=MEDIA?>img/pic-program.jpg" width="80" height="80" alt=""></a>
										<p>Lorem ipsum dolor sit amet,
										consectetur adipiscing elit. Sed
										do eismod tempor incididunt ut labore dolore magna aligua.</p>
										<a href="#" class="more">details</a>
									</li>
									<? if(isset($load_vars_getAllCountry) and count($load_vars_getAllCountry)) { ?>
										<li class="category clearfix">
										<br class="cb"/>
										<h4 class="categorytitle"><?=$this->lang->line("STUDY_ABROAD_COUNTRIES")?></h4>
											<ul class="multicol colnum4 list">
												<?
													foreach($load_vars_getAllCountry as $couData) {
														echo	"<li>".anchor($couData["conUrlName"]."/".$couData["couUrlName"], $couData["couName"], "", $forced = TRUE)."</li>";
													}
												?>
											</ul>
										</li>
									<? } ?>
								</ul>
							</div>
						</li>
						<li><?=anchor("summer-study", "<span>Summer study</span>")?></li>
						<li <?=(($this->uri->segment(1) == "scholarships")?("class=\"active\""):(""))?>><?=anchor("scholarships", "<span>".$this->lang->line("SCHOLARSHIPS_MULTILINE")."</span>")?></li>
						<li><a href="#"><span>Intern&shy;ship</span></a></li>
						<li <?=(($this->uri->segment(1) == "majors")?("class=\"active\""):(""))?>><?=anchor("majors", "<span>".$this->lang->line("MAJOR")."</span>")?></li>
					</ul>
				</nav>
				<nav id="breadcrumb" <?=($h1 ? "style=\"top:560px;\"" : "")?>>
					<?
					if(isset($breadcrumbs) and count($breadcrumbs)) {
						echo	"<div id=\"breadcrumbs\" itemprop=\"breadcrumb\">";
						$cnt = count($breadcrumbs);
						$first = TRUE;
						foreach($breadcrumbs as $ii => $part) {
							if(!$first) {
								echo		"<em>/</em>";
							}
							$first = FALSE;
							if(is_string($ii)) {
								echo	anchor($ii, "<span itemprop=\"title\">".$part."</span>", "itemprop=\"url\"");
							} else {
								echo	"<span itemprop=\"title\">".$part."</span>";
							}
						}
						echo "</div>";
					}
					?>
					<!--<a href="#">	</a><em>/</em><span>Study abroad</span>-->

				</nav>
				<div id="sharing">

					<?php /*google+*/ if(isset($share) and $share) { ?>

					<!-- Helyezd el ezt a címkét a head szakaszban vagy közvetlenül a záró body címke elé. -->
					<script src="https://apis.google.com/js/platform.js" async defer>
					  {lang: 'hu'}
					</script>

					<!-- Helyezd el ezt a címkét ott, ahol a(z) +1 gomb modult meg szeretnéd jeleníteni. -->
					<div class="g-plusone" data-annotation="none" style="float:right;"></div>

					<?php } ?>

					<div id="fb-root" style="float:right;"></div>

					<?php /*facebook*/ if(isset($share) and $share) { ?>
					<script>(function(d, s, id) {
					  var js, fjs = d.getElementsByTagName(s)[0];
					  if (d.getElementById(id)) return;
					  js = d.createElement(s); js.id = id;
					  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=<?=$this->config->item("APP_ID")?>&version=v2.0";
					  fjs.parentNode.insertBefore(js, fjs);
					}(document, 'script', 'facebook-jssdk'));</script>
					<div class="fb-share-button" style="position:relative; margin-left: 4px; top: 2px; float:right;" data-href="<?=current_url()?>" data-layout="button_count"></div>
					<?php } ?>
				</div>
			</div>
		</header>

		<div class="main inner clearfix">
			<article class="content">
				<?
				if(isset($content)) {
					echo	$content;
				}

				if(isset($errorMessage)) {
					echo	$errorMessage;
				}

				?>
			</article>

			<?

				if(isset($sidebar)) {
					echo	$sidebar;
				}

				if(isset($content2)) {
					echo	$content2;
				}

			?>

		</div>

		<footer>
		<? if(count($load_vars_getArticles) or count($load_vars_getCountry) or count($load_vars_getCity) or count($load_vars_getMajor)) { ?>
		<div class="inner">
			<ul class="multicol colnum4">
				<? if(count($load_vars_getCountry) or count($load_vars_getCity)) { ?>
				<li class="category col col2 clearfix">
					<h4 class="categorytitle"><?=$this->lang->line("DESTINATIONS")?></h4>
					<ul class="multicol colnum2 list">
						<?
						foreach($load_vars_getCountry as $ii => $cou) {
							echo	"<li>".anchor($cou["conUrlName"]."/".$cou["couUrlName"], $cou["couName"])."</li>";
						}
						foreach($load_vars_getCity as $ii => $city) {
							echo	"<li>".anchor($city["conUrlName"]."/".$city["couUrlName"]."/".$city["cityUrlName"], $city["cityName"])."</li>";
						}
						?>
					</ul>
				</li>
				<? } ?>
				<? if(count($load_vars_getMajor)) { ?>
				<li class="category col clearfix">
					<h4 class="categorytitle"><?=$this->lang->line("MAJORS")?></h4>
					<ul class="list">
						<?
						foreach($load_vars_getMajor as $ii => $maj) {
							echo	"<li>".anchor("institutes/".$maj["insUrlName"]."/".$maj["majUrlName"], $maj["majName"])."</li>";
						}
						?>
					</ul>
				</li>
				<? } ?>
				<?
				$recommendation_art = "";
				foreach($load_vars_getArticles as $ii => $art) {
					if($art["artPosition"] == "R") {
						$recommendation_art .= "<li>".anchor($art["artUrlName"], $art["artName"])."</li>";
						unset($load_vars_getArticles[$ii]);
					}
				}
				if($recommendation_art) {
				?>
				<li class="category col widecol clearfix">
					<h4 class="categorytitle"><?=$this->lang->line("MOVE2STUDY")?></h4>
					<ul class="list">
						<?=$recommendation_art?>
					</ul>
				</li>
				<?
				}
				?>
				<li class="category col widecol clearfix">
					<h4 class="categorytitle">Move2Study Newsletter</h4>
					<form id="newsletter">
						<input type="text" class="data" id="email" placeholder="Your e-mail">
						<input type="submit" class="inlinebutton" value="Subscribe"><br>
					</form>
				</li>
			</ul>

			<div id="bottombar">
				Contact Move2Study
				<nav>
					<?
					foreach($load_vars_getArticles as $ii => $art) {
						if($art["artPosition"] == "F") {
							echo	anchor($art["artUrlName"], $art["artName"])." <em>|</em>";
							unset($load_vars_getArticles[$ii]);
						}
					}
					?>
					<?=anchor("sitemap", $this->lang->line("SITEMAP"))?>
				</nav>
			</div>
			<?
			echo	"<table cellspacing=\"0\" class=\"center pad0\" style=\"width: 950px;\">";
			echo		"<tr>";
			echo			"<td class=\" c w33\">Execution time: ".$this->benchmark->elapsed_time()." sec</td>";
			echo			"<td class=\"c w33\">Number of queries: ".count($this->db->queries)."</td>";
			echo			"<td class=\"c w33\">Memory consumption: ".str_replace("MB", " MB", $this->benchmark->memory_usage())."</td>";
			echo		"</tr>";
			echo	"</table>";
			?>
		</div>
		<? } ?>
		</footer>

		<!--[if lt IE 7 ]>
				<script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
				<script>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script>
		<![endif]-->
		
		<?
		if(isset($error_message)) {
			echo	"
					<script type=\"text/javascript\">
						alert('".$error_message."');
					</script>
					";
			
		}
		
		if(isset($jscallback)) {
			echo	"
					<script type=\"text/javascript\">
						".$jscallback."
					</script>
					";
		}
		?>
		
		<? if(defined("STUDY_PREVIEW")) echo	"<div class=\"alert_warning\" style=\"position:fixed; bottom:0; width: 100%; opacity: 0.8; filter: alpha(opacity=80);\">".$this->lang->line("ATTENTION_THE_SITE_EXISTS_UNPUBLISHED_DATA")."</div>"; ?>
		<?
		if(!get_cookie("cookie_accepted")) {
			echo	"<div class=\"alert_warning\" id=\"cookie_accept\" style=\"position:fixed; bottom:0; width: 100%; opacity: 0.8; filter: alpha(opacity=80); z-index:101;\">".$this->lang->line("COOKIE_ACCEPT_MESSAGE")." <button class=\"button\" onclick=\"$('#cookie_accept').fadeOut('slow', function() { $('#cookie_accept').remove(); setCookie('cookie_accepted', 'true', 1000); });\">Ok</button></div>";
		}
		?>

	</body>
</html>